class EmailQueue < ActiveRecord::Base
  def self.send_all_email_in_queue
    EmailQueue.find(:all, :order => "created_at asc").each do |email|
      ExceptionNotifier.deliver_sys_email(email.recipient, email.subject, email.content, email.content_type)
      email.destroy
    end
  end
end
